<template>
    <div class="sm-workUnpackMidTable">
        <el-table
        ref="receiveTable"
        size="mini"
        :data="resData"
        style="width: 100%"
        height="190"
        >
        <el-table-column type="index" label="序号" width="50" :show-overflow-tooltip="true"> </el-table-column>
        <el-table-column prop="barcode" label="条码"  :show-overflow-tooltip="true"> </el-table-column>
        <el-table-column prop="productName" label="机型" :show-overflow-tooltip="true"> </el-table-column>
        <el-table-column prop="batchNo" label="批次" :show-overflow-tooltip="true" > </el-table-column>
        <el-table-column prop="msTaskAoId" label="架次" :show-overflow-tooltip="true"> </el-table-column>
        <el-table-column prop="packageCode" label="工作包编号" :show-overflow-tooltip="true"> </el-table-column>
        <el-table-column prop="packageName" label="工作包名称" :show-overflow-tooltip="true"> </el-table-column>
        <el-table-column prop="aoCode" label="AO编号" :show-overflow-tooltip="true"> </el-table-column>
        <el-table-column prop="aoName" label="AO名称" :show-overflow-tooltip="true"> </el-table-column>
        <!-- <el-table-column prop="requiredTime" label="要求时间" :show-overflow-tooltip="true"> </el-table-column> -->
        <el-table-column prop="qty" label="物料编码" :show-overflow-tooltip="true"> </el-table-column>
        <el-table-column prop="unit" label="物料名称" :show-overflow-tooltip="true"> </el-table-column>
        <el-table-column prop="sender" label="质量编号" :show-overflow-tooltip="true"> </el-table-column>
        <el-table-column prop="sendTime" label="要求数量" :show-overflow-tooltip="true"> </el-table-column>
        <el-table-column prop="sendTime" label="分拣数量" :show-overflow-tooltip="true"> </el-table-column>
        <el-table-column prop="sendTime" label="物料分类" :show-overflow-tooltip="true"> </el-table-column>
        <el-table-column prop="remark" label="备注" :show-overflow-tooltip="true"> </el-table-column>
      </el-table>
        <!-- 分页 -->
        <el-pagination
        layout="prev, pager, next"
        :total="totalCount"
        :page-size="pageSize"
        @current-change="handleCurrentChange"
        >
        </el-pagination>
    </div>
</template>
<script>
import { workpackageUnpackTop } from "@/utils/api.js";
export default {
    name:'WorkUnpackMidTable',
    data(){
        return {
            // 当前页数
            pageNumber: 1,
            // 数据总个数
            totalCount: 0,
            // 返回的数据数组
            resData: [],
            // 每页数据个数
            pageSize: 20,
            // 确认列表高亮参数
            stableIndex: 0,
            value: "",
            ss: "",
        }
    },
    methods:{
        handleCurrentChange(val) {
            this.pageNumber = val;
            workpackageUnpackTop({
                pageParameter: {
                rows: this.pageSize,
                page: this.pageNumber,
                },
            }).then((res) => {
                this.resData = res.data.responseBody.result;
                this.totalCount = res.data.responseBody.pageParameter.totalCount;
            });
        },
    },
    mounted() {
        workpackageUnpackTop({
            pageParameter: {
            rows: this.pageSize,
            page: this.pageNumber,
            },
        }).then((res) => {
            console.log('工作包拆包Mid表',res)
            this.resData = res.data.responseBody.result;
            this.totalCount = res.data.responseBody.pageParameter.totalCount;
            
        });
  }
}
</script>
<style scoped>
.sm-workUnpackMidTable {
    width: 100%;
    height: 220px;
    text-align: center;
}
</style>